/*
 * Copyright (c) 2006-2023, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-04-27     RT-Thread    first version
 */

#include <rtthread.h>
#include "g_io_manage.h"
#include "screen.h"

static rt_thread_t Screen_thread;
#define Screen_thread_pri       15


void screen_task(void* parameter)
{
    while(1)
    {
        //Screen_TFT22Handle.clear(Green);
        Screen_TFT22Handle.show_img();
        //rt_thread_mdelay(80);
    }
}


int main(void)
{

    /*-----------------------------------------------------------------*/
    /* Screen */
    Screen_thread = rt_thread_create("Screen", screen_task, RT_NULL, 4096, Screen_thread_pri, 10);
    if(Screen_thread != RT_NULL){
        rt_thread_startup(Screen_thread);
    }
    else{
        rt_kprintf("Screen_thread is failed to create!\r\n");
    }
    /*-----------------------------------------------------------------*/


    while (1)
    {
        rt_kprintf("running!\r\n");
        G_ioHandle.toggle(7);
        rt_thread_mdelay(1000);
    }
    return RT_EOK;
}
